package com.fs.video.config;

import com.fs.video.common.sysconst.SystemConst;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * webmvc的配置类
 */
@Configuration  //配置类
public class WebmvcConfig implements WebMvcConfigurer {
    //设置静态资源的映射    ctrl + o 重写方法
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("file:"+ SystemConst.SAVE_ROOT_PATH);

    }
}
